home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>2</cardCount>
- <cardID>3591</cardID>
- <listID>3283</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>342</height>
- </cardSize>
- <script>••••• System Messages •••••
-
- on openCard
- ShowCdNumInBackground "Card Number"
- pass openCard
- end openCard
-
- on closeCard
- lock screen
- pass closeCard
- end closeCard
-
- ••••• Label Field Package •••••
-
- on LabelFieldClick
- if the commandKey is not down then exit LabelFieldClick
- put the locktext of the target into OldLocked
- set the locktext of the target to not (OldLocked)
- if OldLocked is true then play harpsichord "c5s" -- it’s unlocked now; high tone
- else play harpsichord "c4s" -- it’s locked now; low tone
- end LabelFieldClick
-
- ••••• Card Number Display Package •••••
-
- on ShowCdNumInBackground FieldName
- if there is a bg field FieldName
- then put CdNumInBackground() into bg field FieldName
- else if there is a card field FieldName
- then put CdNumInBackground() into card field FieldName
- end ShowCdNumInBackground
-
- on ShowCdNumInStack FieldName
- if there is a bg field FieldName
- then put CdNumInStack() into bg field FieldName
- else if there is a card field FieldName
- then put CdNumInStack() into card field FieldName
- end ShowCdNumInStack
-
- function CdNumInBackground -- assumes cards of current bg are together
- put the number of cards in this bg into NumCards
- put the number of card 1 of this background into FirstCard
- put the number of this card into ThisCard
- return "Card" && (ThisCard - FirstCard + 1) && "of" && NumCards
- end CdNumInBackground
-
- function CdNumInStack
- put the number of cards in this stack into NumCards
- put the number of this card into ThisCard
- return "Card" && ThisCard && "of" && NumCards
- end CdNumInStack
-
-
- ••••• Valid Entry Package
- ••••• Version 1.3 -- For use with for HyperCard 2.0 and later.
- ••••• September 18, 1990
- ••••• By Chris Thorman, Apple Computer, Inc.
- •••••
- ••••• Freeware, but please include the first six lines of this message.
-
- on StartValidatedEntry
- global ValidValueOnEntry
- global ValidationEnabled
-
- put target into ValidValueOnEntry
- put true into ValidationEnabled
- end StartValidatedEntry
-
- on CancelValidation FieldNames
- global ValidationEnabled
- if (FieldNames is empty) or (the selectedField is empty) then
- put false into ValidationEnabled
- else
- put the short name of the selectedField into SelectedName
- repeat with FieldNum = 1 to the number of items in FieldNames
- if item FieldNum of FieldNames is SelectedName
- then
- put false into ValidationEnabled
- end if
- end repeat
- end if
- end CancelValidation
-
- on ReEnableValidation
- global ValidationEnabled
- put true into ValidationEnabled
- end ReEnableValidation
-
- on ValidateNumberEntry LowBound, HighBound
- global ValidationEnabled
- if ValidationEnabled is false then exit ValidateNumberEntry
- else
- put target into NewValue
-
- if LowBound is empty then put NewValue into LowBound
- if HighBound is empty then put NewValue into HighBound
-
- if NewValue is not a number ¬
- or NewValue < LowBound ¬
- or NewValue > HighBound ¬
- then
- ResetToValidValue
- end if
- end if
- end ValidateNumberEntry
-
- on ValidateIntegerEntry LowBound, HighBound
- global ValidationEnabled
- if ValidationEnabled is false then exit ValidateIntegerEntry
- else
- put target into NewValue
- if LowBound is empty then put NewValue into LowBound
- if HighBound is empty then put NewValue into HighBound
-
- if NewValue is not an integer ¬
- or NewValue < LowBound ¬
- or NewValue > HighBound ¬
- then
- ResetToValidValue
- end if
- end if
- end ValidateIntegerEntry
-
- on ValidateDateEntry LowBound, HighBound
- global ValidationEnabled
- if ValidationEnabled is false then exit ValidateDateEntry
- else
- put target into NewValue
-
- if LowBound is empty then put NewValue into LowBound
- if HighBound is empty then put NewValue into HighBound
-
- if NewValue is not a date ¬
- or NewValue < LowBound ¬
- or NewValue > HighBound ¬
- then
- ResetToValidValue
- end if
- end if
- end ValidateDateEntry
-
- on ValidateNonEmptyEntry
- global ValidationEnabled
- if ValidationEnabled is false then exit ValidateNonEmptyEntry
- else
- put target into NewValue
-
- if NewValue is empty ¬
- then
- ResetToValidValue
- end if
- end if
- end ValidateNonEmptyEntry
-
- on ValidateArbitraryEntry
- global ValidationEnabled
- if ValidationEnabled is false then exit ValidateArbitraryEntry
- else
- send "DoArbitraryValidation" to the target
- end if
- end ValidateArbitraryEntry
-
- on DoArbitraryValidation
- ResetToValidValue
- end DoArbitraryValidation
-
- on DoUserExplanation TheReplacementValue
- -- This behavior is often overridden by particular fields
- answer "The value “" & target & "” is invalid. The value “" & ¬
- TheReplacementValue & "” will be kept."
- end DoUserExplanation
-
- on KeepOnlyFirstWord
- put word 1 of target into the target
- end KeepOnlyFirstWord
-
- on KeepOnlyFirstLine
- put line 1 of target into the target
- end KeepOnlyFirstLine
-
- on KeepOnlyVisibleLines
- put the height of the target into FieldHeight
- put the textHeight of the target into LineHeight
- put trunc(FieldHeight/LineHeight) into NumVisibleLines
- put line 1 to NumVisibleLines of target into the target
- end KeepOnlyVisibleLines
-
- on UseTextStyleOfField
- get target
- put it into the target
- end UseTextStyleOfField
-
- on RemoveTrailingZeroes
- put target into Val
- if Val is an integer then
- put the numberFormat into OldFormat
- set the numberFormat to 0
- put Val + 0 into Val
- set the numberFormat to OldFormat
- put Val into the target
- end if
- end RemoveTrailingZeroes
-
- on ResetToValidValue
- global ValidValueOnEntry
- put line 1 of ValidValueOnEntry into ReplaceText
- send "DoUserExplanation" && quote & ReplaceText & quote to the target
- put ValidValueOnEntry into the target
- end ResetToValidValue
-
- </script>
- <background id="4419" file="background_4419.xml" name="" />
- <card id="3591" file="card_3591.xml" marked="false" name="" owner="4419" />
- <card id="3903" file="card_3903.xml" marked="false" name="" owner="4419" />
- </stack>
-